<?php

use yii\helpers\Html;
use yii\grid\GridView;
use common\models\Poststatus;


/* @var $this yii\web\View */
/* @var $searchModel common\models\PostSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '权限';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="post-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php  //echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('创建权限', ['create'], ['class' => 'btn btn-success']) ?>
        <?= Html::a('分配权限', ['allot'], ['class' => 'btn btn-success']) ?>
    </p>

   <?php //$searchModel = new common\models\Tag();?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
       // 'filterModel' => $searchModel,
        'columns' => [
            //['class' => 'yii\grid\SerialColumn'],

            //'id',
            ['attribute'=>'name',
            'contentOptions'=>['width'=>'30px'],
            ],
            'description',

            // 'create_time:datetime',
             //'update_time:datetime',
             ['attribute'=>'updated_at',
             'format'=>['date','php:Y-m-d H:i:s'],
        	],
             

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

</div>
